<include file="public@header"/>
<link href="__STATIC__/admin/js/cityLayout.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="__STATIC__/admin/js/cityselect.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/jquery-1.9.1.min.js"></script>
<script>
$(function(){
    init_city_select($("#sel1, #sel2"));
});
function getValue() {
    alert($('#sel1').val());
}
</script>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('activity/index')}">活动列表</a></li>
        <li class="active"><a href="#">编辑活动</a></li>
        <li><a href="{:url('activity/lst')}">活动报名记录</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('activity/edit')}"
          method="post">
          <input type="hidden" name="id" value="{$info['id']}">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动名称</label>
                            <div class="col-md-3 col-sm-5">
                                <input type="text" class="form-control" name="name"
                                       value="{$info['name']}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动内容</label>
                            <div class="col-md-3 col-sm-5">
                                <textarea name="content" cols="40" rows="7">{$info['content']}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">限定人数</label>
                            <div class="col-md-3 col-sm-5">
                                <input type="text" class="form-control" name="num"
                                       value="{$info['num']}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动状态</label>
                            <div class="col-md-3 col-sm-5">
                                <select name="status" class="form-control">
                                    <option <if condition="$info['status'] eq 1"> selected </if> value="1">--下线--</option>
                                    <option <if condition="$info['status'] eq 2"> selected </if> value="2">--发布--</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">地区选择</label>
                            <div class="col-md-3 col-sm-5">
                                <!-- <input type="text" class="form-control" name="answer[C]"
                                        value="{$answer['C']|default=''}"> -->
                                <input name="city" id="sel1"  type="text"  class="city_input form-control" readonly="readonly" value="{$info['city']}">
                            
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">图片上传</label>
                            <div class="col-md-6 col-sm-10">
                                <input id="photo-1" type="hidden" name="img">
                                <input type="text" class="form-control" name="img" value="{$info['img']}" disabled>
                                <a href="javascript:uploadOneImage('图片上传','#photo-1');">
                                    <img style="width:260px;height:140px;" id="photo-1-preview" src="{$info['img']}">
                                </a>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" style="width:150px;" class="btn btn-primary">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
    </form>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
